package com.genexususa.eo.google.analytics;

import javax.xml.bind.annotation.*;

/**
 * Created with IntelliJ IDEA.
 * User: Nico
 * Date: 19/07/13
 * Time: 04:36 PM
 * To change this template use File | Settings | File Templates.
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "GoogleAnalyticsResult")
public class GoogleAnalyticsResult implements IAPIResult {

    @XmlElement(name = "TotalVisits")
    public float TotalVisits;

    @XmlElement(name = "TotalUniqueVisits")
    public float TotalUniqueVisits;

    @XmlElement(name = "TotalPageviews")
    public float TotalPageviews;

    @XmlElement(name = "PagesPerVisit")
    public float PagesPerVisit;

    @XmlElement(name = "AvgVisitDuration")
    public float AvgVisitDuration;

    @XmlElement(name = "BounceRate")
    public float BounceRate;

    @XmlElement(name = "NewVisitsPercentage")
    public float NewVisitsPercentage;

    @XmlElement(name = "TotalNonBrandedVisits")
    public float TotalNonBrandedVisits;

    @XmlElement(name = "AssistedConversions")
    public float AssistedConversions;

    @XmlElement(name = "ViewThroughConversions")
    public float ViewThroughConversions;

    @XmlElement(name = "LastClickConversions")
    public float LastClickConversions;

    @XmlElement(name = "HasError")
    public boolean HasError;

    @XmlElement (name = "Errors")
    public ErrorsStruct Errors;

    public GoogleAnalyticsResult(){

        this.TotalVisits = 0F;
        this.TotalUniqueVisits = 0F;
        this.TotalPageviews = 0F;
        this.PagesPerVisit = 0F;
        this.AvgVisitDuration = 0F;
        this.BounceRate = 0F;
        this.NewVisitsPercentage = 0F;
        this.TotalNonBrandedVisits = 0F;
        this.AssistedConversions = 0F;
        this.ViewThroughConversions = 0F;
        this.LastClickConversions = 0F;

        HasError = false;
    }

}
